﻿using Cirrious.MvvmCross.Plugins.Sqlite;
using System.Collections.Generic;
using TeaLightV5.Foundation.BL;
using TeaLightV5.Foundation.Sal.Interfaces;

namespace TeaLightV5.Foundation.Dal
{
    public interface IRepositoryBase
    {
    }

    public interface IRepositoryBase<T, in TKey>
        : IRepositoryBase
        where T : IEntity<TKey>, new()
         
    {
        ITableQuery<T> GetTable();

        IEnumerable<T> GetAll();

        T GetById(TKey id);

        int Save(T item);

        void SaveAll(IEnumerable<T> items);

        void UpdateAll(IEnumerable<T> items);

        int Delete(TKey id);

        void DeleteAll();
    }
}